package com.hframe.typefilter;

/**
 * 字符串转数字
 *
 * @author Administrator
 */
public class StringToByte implements FilterRef<Byte, Object> {

    @Override
    public Byte filter(Object object) throws Exception {
        return Byte.parseByte((String) object);
    }

    public static Byte parse(String object) {
        try {
            return Byte.parseByte(object);
        } catch (Exception e) {
            return null;
        }
    }
}